package edu.nctu.csie.jichang.dp.structural;

import java.util.ArrayList;
import java.util.List;

public class Composite {
	public static void main(String[] args) {
		ComponentClass tComponent = new ComponentClass();
		CompositeClass tCompositeClass = new CompositeClass();
		tCompositeClass.children.add(tComponent);
		System.out.println(tCompositeClass);
	}
}

class ComponentClass{
}
class CompositeClass extends ComponentClass{
	List<ComponentClass> children = new ArrayList<ComponentClass>();
}